rem 导入数据库数据

set cwd=%~dp0
set dist=%cwd%..\sql
set host=122.9.46.174
rem set host=localhost
set port=18606
set user=root
set pass=root

pushd D:\mysql-5.7.36-winx64
rem pushd C:\mysql-5.7.38-winx64

rem 启动命令行测试

rem 重置管理员 admin 密码 BCryptPasswordEncoder('123456') => $2a$10$SqbQb0pD3KYrH7ZVTWdRZOhPAelQqa..lUnysXoWag6RvMkyC5SE6
rem 重置管理员 admin 密码 BCryptPasswordEncoder('123456') => $2a$10$0sjBLlwrrch2EjgYls197e9dGRCMbQ7KUIt/ODPTSU0W.mEPaGkfG

bin\mysql -u %user% --password=%pass% -h %host% -P %port% --default-character-set=utf8mb4 mysql
pause

bin\mysql -u %user% --password=%pass% -h %host% -P %port% --default-character-set=utf8mb4 mysql             < %dist%\createdb.sql

bin\mysql -u %user% --password=%pass% -h %host% -P %port% --default-character-set=utf8mb4 data_cloud        < %dist%\data_cloud.sql
bin\mysql -u %user% --password=%pass% -h %host% -P %port% --default-character-set=utf8mb4 data_cloud_quartz < %dist%\tables_mysql_innodb.sql
bin\mysql -u %user% --password=%pass% -h %host% -P %port% --default-character-set=utf8mb4 robot             < %dist%\robot.sql
bin\mysql -u %user% --password=%pass% -h %host% -P %port% --default-character-set=utf8mb4 foodmart2         < %dist%\foodmart2.sql

popd

pause